package com.hqd.ch03.v46.boot.context.config;

public abstract class ConfigDataResource {

    private final boolean optional;

    /**
     * Create a new non-optional {@link ConfigDataResource} instance.
     */
    public ConfigDataResource() {
        this(false);
    }

    /**
     * Create a new {@link ConfigDataResource} instance.
     *
     * @param optional if the resource is optional
     * @since 2.4.6
     */
    protected ConfigDataResource(boolean optional) {
        this.optional = optional;
    }

    boolean isOptional() {
        return this.optional;
    }

}
